#ifndef __PLAYER_H__
#define __PLAYER_H__

#include "define.h"
#include "Ship.h"
#include "Ogre.h"
#include <string>

class Player
{
public:
    Player();
	Player(ship_type _type, std::string& _name, Ogre::Vector3 _orginal_pos, Ogre::Quaternion _original_ori);
	virtual ~Player(){}

	const std::string& get_name() const;
	bool operator  != (const Player &p) const;
	std::string operator +(const std::string& str) const;
	
	Ship*			  get_ship()		{return mShip;}
	Ogre::Vector3	  get_position()	{return mShip->get_position();}	
	Ogre::Quaternion  get_orientation()	{return mShip->get_orientation();}	

	void set_ship(Ship* _ship)		 {mShip = _ship;}
	void set_life(int _life)		 {mLife = _life;}
	void set_name(std::string& _name){mName = _name;}	

	void update(Ogre::Vector3 _position, Ogre::Quaternion _orientation);
	void update_life(int _life);

	template<class Archive>
	  void serialize(Archive& ar, const unsigned int version)
	  {
	    ar & mName ; // & mShip;
	  }



private:
	Ship*		mShip;
	int			mLife;
	std::string	mName;
};

#endif 
